]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dialog: Use object's set to assign properties
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 3 May 2019 20:30:42 +0000 (15:30 -0500)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 3 May 2019 20:34:06 +0000 (15:34 -0500)
We can just assign a properties object to a GObject using the set() method
instead of using Object.assign.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/531

js/ui/dialog.js

index 41a07635369a8e1623cb40c09a949ef2ed4199bd..553b81c78696441595cdc96fb359111930a648ec 100644 (file)
@@ -177,8 +177,8 @@ var MessageDialogContent = GObject.registerClass({
 
         let textProps = { ellipsize: Pango.EllipsizeMode.NONE,
                           line_wrap: true };
-        Object.assign(this._subtitle.clutter_text, textProps);
-        Object.assign(this._body.clutter_text, textProps);
+        this._subtitle.clutter_text.set(textProps);
+        this._body.clutter_text.set(textProps);
 
         if (!params.hasOwnProperty('style_class'))
             params.style_class = 'message-dialog-main-layout';